<template>
  <view class="tab-component">
    <view class="bottom-tab-box">
      <view
        class="left-tab-item"
        v-for="(item, index) in menuList"
        :key="index"
      >
        <view class="image-box">
          <image :src="item.imageUrl" mode="widthFix" />
        </view>
        <text class="title">{{ item.title }}</text>
        <view class="image-bg">
          {{ item.price }}
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { defineComponent, reactive, toRefs } from "vue";
export default defineComponent({
  name: "",
  props: {
    menuList: {
      type: Array,
      default: () => {
        return [
          {
            id: 21,
            title: "轻薄外套",
            imageUrl: "/static/components/tab/women/轻薄外套.jpg",
            price: "¥149",
          },
          {
            id: 22,
            title: "连体裙",
            imageUrl: "/static/components/tab/women/连体裙.jpg",
            price: "¥299",
          },
          {
            id: 23,
            title: "帽衫",
            imageUrl: "/static/components/tab/women/帽衫.jpg",
            price: "¥99",
          },
          {
            id: 24,
            title: "牛仔裤",
            imageUrl: "/static/components/tab/women/牛仔裤.jpg",
            price: "¥199",
          },
        ];
      },
    },
  },
  components: {},
  setup() {
    const data = reactive({});
    return {
      ...toRefs(data),
    };
  },
});
</script>

<style scoped lang="less">
.tab-component {
  display: flex;
  flex-direction: column;
  background: url("/static/common/weipinhui/tmbg.png");
  background-size: cover;
  padding: 0 15rpx;
  padding-top: 68rpx;

  .bottom-tab-box {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    .left-tab-item {
      flex: 1;
      margin: 0 10rpx;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: relative;
      .image-box {
        width: 100%;
        image {
          width: 100%;
          display: block;
        }
      }
      .title {
        margin-top: 6rpx;
        font-size: 20rpx;
        font-weight: 300;
      }
      .image-bg {
        background: url("/static/common/weipinhui/tm-tips.png");
        background-size: cover;
        height: 30rpx;
        border-radius: 6rpx;
        width: 100%;
        margin-bottom: 20rpx;
        text-align: left;
        line-height: 30rpx;
        color: #fff;
        font-size: 24rpx;
        margin-top: 6rpx;
        padding-left: 75rpx;
        box-sizing: border-box;
      }
    }
  }
}
</style>
